# $Id: PKGBUILD 77911 2012-10-15 19:59:57Z rvanharen $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Thomas S Hatch <thatch45@gmail.com>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: Todd Maynard <arch@toddmaynard.com>

pkgname=python2-sqlobject
pkgver=1.2.1
pkgrel=3
pkgdesc="Object Relational Manager for providing an object interface to your database"
arch=('any')
license=('LGPL')
url="http://sqlobject.org/"
depends=('python2' 'python2-distribute' 'python2-formencode')
optdepends=('python2-psycopg2: PostgreSQL database support'
	    'python2-pysqlite-legacy: SQLite database support')
source=("http://pypi.python.org/packages/source/S/SQLObject/SQLObject-$pkgver.tar.gz")
sha256sums=('d6d7f962f4120b874e7e7afd2b5299da3d826fcc50b787a3db84e254e71b432f')

package() {
  cd "$srcdir/SQLObject-$pkgver"

  python2 setup.py install --root="$pkgdir"
  find $pkgdir/usr/lib -type f -exec sed -i 's,^#!/usr/bin/env python,#!/usr/bin/env python2,' {} \;
  echo "/usr/lib/python2.7/site-packages/SQLObject-$pkgver-py2.6.egg" > \
    "$pkgdir/usr/lib/python2.7/site-packages/$pkgname.pth"
}

# vim:set ts=2 sw=2 et:
